import java.sql.*;

public class test{
    public static void main(String[] args){
        try{
            Class.forName("com.mysql.jdbc.Driver");
            
            String url = "jdbc:mysql://localhost:3306/hotel?useSSL=false";
            Connection conn = DriverManager.getConnection(url, "root", "");
            
            Statement stmt = conn.createStatement();
            
            String sql = "select * from staff where staff_name = 'jj'";
            ResultSet rs = stmt.executeQuery(sql);
            
            if(rs == null){
                System.out.println("null");
            }else{
                System.out.println(rs);
            }
            
            while(rs.next()){
                System.out.println("haha");
            }
            
        }catch(Exception e){
            e.printStackTrace();
        }
    }
}